package com.pb.metadata.mapper;

import com.pb.metadata.entity.ImportDimData;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DimManagementMapper {
    //--查询最大CodeTypeId
    Long selMaxCodeTypeId(Map<String, Object> map);
    //--保存维度管理数据
    void saveDimDate(Map<String, Object> map);
    //--查询维度树
    List<Map<String, Object>> selectDimData(Map<String, Object> map);
    //查询统一管理类型维度树
    List<Map<String, Object>> selectComDimData(Map<String, Object> map);
    //--修改维度树
    void updateDimDate(Map<String, Object> map);
    //--删除维度树
    void delDimDate(Map<String, Object> map);
    //--查询树节点
    List<Map<String, Object>> selectTree(Map<String, Object> map);
    //--插入树节点
    void insertNode(Map<String, Object> paramMap);
    //--根据节点CodeTypeId、businessCode查询
    Map selectByTreeId(Map<String, Object> paramMap);
    //--查询最大CODE_TYPE_ID
    Long selMaxCodeId(Map<String, Object> paramMap);
    //--查询同级最大ORDER_FLAG
    Long selMaxOrderFlag(Map<String, Object> paramMap);
    //查询节点路径
    String selNodePath(Map<String, Object> paramMap);
    //逻辑删除树节点
    void deleteNode(@Param("tableName") String tableName, @Param("corpId") String corpId, @Param("treeId") String treeId, @Param("list") List list);
    //删除树节点
    void delTreeNode(Map<String, Object> map);
    //查询全部对应树节点，导出数据
    List<Map<String, Object>> selTreeData(Map<String, Object> map);
    //修改树节点
    void updateNode(Map<String, Object> paramMap);
    //(拖拽)更改树节点
    void updateNodeHierarchy(Map<String, Object> paramMap);
    //查询关联码值列表
    List<Map<String, Object>> getrelaStdCodeList(Map<String, Object> map);
    //查询维度类型列表
    List<Map<String, Object>> selDimTypeList(Map<String, Object> map);
    //维度树、维度类型绑定
    void saveDimTreeBind(Map<String, Object> map);
    //删除绑定数据
    void delDimBind(Map<String, Object> map);
    //属性值查询
    List<Map<String, Object>> dimAttrTableData(Map<String, Object> paramMap);
    //查询关联标准编码codeTypeId
    Map selRelaCodeTypeId(Map<String, Object> paramMap);
    //查询码值列表
    List<Map<String, Object>> getmateCodeValueList(Map map);
    //删除叶子结点对应属性值
    void delDimAttrTableData(Map map);
    //重新保存叶子结点对应属性值
    void saveDimAttrTableData(Map map);
    //更改是否关联状态，以及关联码值
    void updatePropertyRegistrationRelaCdFlag(Map<String, Object> paramMap);
    //查询树编码是否唯一
    Map validUniqueBusinessCodeType(Map<String, Object> map);
    //全量删除
    void delAllTreeNode(Map<String, Object> paramMap);
    //全量插入
    void insertExcelData(ImportDimData importDimData);

    List<String> selDefaultCheckedTreeNodeBusinessCode(Map<String, Object> map);

    List<String> selDefaultCheckedTreeNodeList(Map<String, Object> map);

    void delNodesAttrValues(List<Map<String, Object>> list);

    void saveNodesAttrValues(List<Map<String, Object>> list);

    String selPostCorpId(Object positionId);
}
